<?php $this->load->view('home/layout/header') ?>
<?php js('skins/home', 'pages/address', 2)?>
<form action="<?php echo site_url('home/address/addPost'); ?>" method="post" id="address-form">
    <header class="my-head flex">
        <div class="city-return my-return">
            <a href="<?php echo site_url('home/address/addressList'); ?>">
                取消
            </a>
        </div>
        <div class="city-name my-name">
            新增收货地址
        </div>
        <div class="add-submit">
            <button type="submit">保存</button>
        </div>
    </header>
    <section class="add-text widthMax" >
        <input type="hidden" name="province_id">
        <input type="hidden" name="city_id">
        <input type="hidden" name="district_id">
        <ul>
            <li>
                <h6>收件人姓名</h6>
                <div class="add-input flex-1">
                    <input type="text" name="receiver_name" placeholder="请填写收货人姓名" >
                </div>
            </li>
            <li>
                <h6>手机号码</h6>
                <div class="add-input flex-1">
                    <input type="tel" name="tel" maxlength="11" placeholder="11位手机号码" >
                </div>
            </li>
            <li>
                <h6>邮政编码</h6>
                <div class="add-input flex-1">
                    <input type="tel" name="code" maxlength="6"  placeholder="邮政编码">
                </div>
            </li>
            <li>
                <h6>省、市、区</h6>
                <div class="add-input flex-1" data-am-modal="{target: '#region-alert'}">
                    <p id="region-name"></p>
                </div>
            </li>
            <li>
                <h6>详细地址</h6>
                <div class="add-input flex-1">
                    <textarea wrap="hard" maxlength="50" name="detailed" placeholder="请填写详细地址"></textarea>
                </div> 
            </li>
        </ul>
    </section>
    <div class="stadd-city am-modal-actions" id="region-alert">
        <div class="bank-head flex">
            <i class="iconfont icon-cha" data-am-modal-close></i>
            <p class="flex-1">请选择城市</p>
        </div>
        <dl class="flex city-dl">
            <dd class="active region-title"  data-type="1">
                <p id="province_name">省</p>
            </dd>
            <dd class="region-title" id="cities-title" data-type="2">
                <p id="city_name">市</p>
            </dd>
            <dd class="region-title" id="districts-title" data-type="3">
                <p id="district_name">区</p>
            </dd>
        </dl>
        <div class="city-blank flex">
            <div class="city-scroller scroller-provinces flex-1 active">
                <div class="scroller" id="provinces-list">
                    <?php $this->load->view('home/address/ajaxRegion'); ?>
                </div>
            </div>
            <div class="city-scroller scroller-cities flex-1 ">
                <div class="scroller am-hide" id="cities-list">
                    <!-- <ul>
                        <li>北京</li>
                    </ul> -->
                </div>
            </div>
            <div class="city-scroller scroller-districts flex-1 ">
                <div class="scroller am-hide" id="districts-list">
                    <!-- <ul >
                        <li>朝阳区</li>
                    </ul> -->
                </div>
            </div>
        </div>
    </div>
</form>
<?php $this->load->view('home/layout/footer'); ?>
